<!DOCTYPE html>
<html   xmlns="http://www.w3c.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head/>
    <h:body>
        <h:form>
            <h:outputText id="txt_count" value="#{pollBean.number}" />
            <p:poll interval="3" listener="#{pollBean.increment}" update="txt_count" widgetVar="myPoll" />
            <a href="#" onclick="PF('myPoll').start();">Start</a>
            <a href="#" onclick="PF('myPoll').stop();">Stop</a>
        </h:form>
    </h:body>
</html>
